using System.Collections.Generic;
using NHibernate.Validator;
using SharpArch.Core.PersistenceSupport;
using SharpArch.Core.DomainModel;
using System;

namespace MindMelder.Core
{
	public class Message
	{
		public virtual int Id { get; set; }
		public virtual bool IsRead { get; set; }
		public virtual string Text { get; set; }
		public virtual User Sender { get; set; }

		public Message()
		{
			// For NH.
		}

		public virtual void SetRead()
		{
			IsRead = true;
		}

		public Message(User sender, string text, bool read)
		{
			this.Sender = sender;
			this.Text = text;
			this.IsRead = read;
		}
	}
}